home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / lan / nos6_122.zip / NEWNOS.BAT < prev    next >
DOS Batch File  |  1996-05-08  |  4KB  |  141 lines

  1. @ECHO OFF
  2. CLS
  3. ECHO.
  4. ECHO *********************************************************************
  5. ECHO * NEWNOS.BAT - Updates to latest versions of REDIR and SERVER       *
  6. ECHO *                                                                   *
  7. ECHO * This batch file installs a new version of SERVER.EXE and          *
  8. ECHO * REDIR.EXE that fix the problems listed in README.TXT.             *
  9. ECHO *                                                                   *
  10. ECHO * This batch file should be in the directory where you installed    *
  11. ECHO * the network (normally C:\LANTASTI).                               *
  12. ECHO * Your present copies of REDIR.EXE and SERVER.EXE will be backed    *
  13. ECHO * up to REDIR.BAK and SERVER.BAK                                    *
  14. ECHO *                                                                   *
  15. ECHO * If your computer is not a server, a warning message will be       *
  16. ECHO * printed out and the update process will continue.                 *
  17. ECHO *                                                                   *
  18. ECHO * Press CTRL-C now to abort running this patch.                     *
  19. ECHO *********************************************************************
  20. ECHO.
  21. PAUSE
  22.  
  23. IF NOT EXIST REDIR.EXE GOTO  ERR1RED
  24. IF NOT EXIST NEWRED.EXE GOTO ERR4RED
  25.  
  26. IF EXIST REDIR.BAK GOTO ERR2RED
  27.  
  28. :INSTALLRED
  29. ECHO.
  30. ECHO Copying old redirector to REDIR.BAK ..
  31. COPY REDIR.EXE REDIR.BAK
  32. ECHO.
  33.  
  34. ECHO Installing new redirector ...
  35. NEWRED INFILE=REDIR.EXE OUTFILE=_REDR_.EXE
  36. IF ERRORLEVEL 1 GOTO    ERR3RED
  37.  
  38. COPY _REDR_.EXE REDIR.EXE
  39. DEL _REDR_.EXE
  40. GOTO DONERED
  41.  
  42. :ERR1RED
  43. ECHO. 
  44. ECHO                           * ERROR *
  45. ECHO. 
  46. ECHO REDIR.EXE not found in this directory - please copy this batch file
  47. ECHO to the directory where REDIR.EXE resides and run NEWNOS again.
  48. ECHO.
  49. GOTO EXIT
  50.  
  51. :ERR2RED
  52. ECHO. 
  53. ECHO                           * ERROR *
  54. ECHO. 
  55. ECHO REDIR.BAK already exists ! it will be overwritten.
  56. ECHO Press CTRL-C to abort
  57. ECHO.
  58. PAUSE
  59. IF EXIST _REDR_.EXE DEL _REDR_.EXE
  60. GOTO INSTALLRED
  61.  
  62. :ERR3RED
  63. ECHO  
  64. ECHO                           * ERROR *
  65. ECHO  
  66. ECHO Operation unsuccessful. Repeat NEWNOS in a directory containing only
  67. ECHO original REDIR.EXE and SERVER.EXE programs.
  68. GOTO EXIT
  69.  
  70. :ERR4RED
  71. ECHO  
  72. ECHO                           * ERROR *
  73. ECHO  
  74. ECHO NEWRED.EXE not found in this directory - please copy this file
  75. ECHO to the directory where REDIR.EXE resides and run NEWNOS again.
  76. GOTO EXIT
  77.  
  78. :DONERED
  79. ECHO                * Redirector successfully patched *
  80.  
  81. IF NOT EXIST SERVER.EXE GOTO ERR1SRV
  82. IF NOT EXIST NEWSRV.EXE GOTO ERR4SRV
  83.  
  84. IF EXIST SERVER.BAK GOTO ERR2SRV
  85.  
  86. :INSTALLSRV
  87. ECHO.
  88. ECHO Copying old server to server.bak ..
  89. COPY SERVER.EXE SERVER.BAK
  90. ECHO.
  91.  
  92. ECHO Installing new server ...
  93. NEWSRV INFILE=SERVER.EXE OUTFILE=_SRVR_.EXE
  94. IF ERRORLEVEL 1 GOTO     ERR3SRV
  95.  
  96. COPY _SRVR_.EXE SERVER.EXE
  97. DEL _SRVR_.EXE
  98. GOTO DONESRV
  99.  
  100. :ERR1SRV
  101. ECHO. 
  102. ECHO                           * WARNING *
  103. ECHO. 
  104. ECHO SERVER.EXE not found in this directory - if this computer is a workstation
  105. ECHO then this error is normal.  If this computer is a server, please move the
  106. ECHO files to the directory where SERVER.EXE resides and run NEWNOS again.
  107. ECHO.
  108. GOTO EXIT
  109.  
  110. :ERR2SRV
  111. ECHO. 
  112. ECHO                           * ERROR *
  113. ECHO. 
  114. ECHO SERVER.BAK already exists ! it will be overwritten.
  115. ECHO Press CTRL-C to abort
  116. ECHO.
  117. PAUSE
  118. IF EXIST _SRVR_.EXE DEL _SRVR_.EXE
  119. GOTO INSTALLSRV
  120.  
  121. :ERR3SRV
  122. ECHO  
  123. ECHO                           * ERROR *
  124. ECHO  
  125. ECHO Operation unsuccessful. Repeat NEWNOS in a directory containing only
  126. ECHO original REDIR.EXE and SERVER.EXE program.
  127. GOTO EXIT
  128.  
  129. :ERR4SRV
  130. ECHO  
  131. ECHO                           * ERROR *
  132. ECHO  
  133. ECHO NEWSRV.EXE not found in this directory - please copy this file
  134. ECHO to the directory where SERVER.EXE resides and run NEWNOS again.
  135. GOTO EXIT
  136.  
  137. :DONESRV
  138. ECHO                * Server successfully patched *
  139.  
  140. :EXIT
  141.